<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>  

<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>

<%@ page isELIgnored="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>活动页</title>
		
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<link href="css/public_ac.css" rel="stylesheet" type="text/css" />
		<link href="css/column_ac.css" rel="stylesheet" type="text/css" />
		<link href="css/activity.css" rel="stylesheet" type="text/css" />
		<script src="dwr/interface/ActivityTypeService.js"></script>
		<script src="dwr/engine.js"></script> 
		<script src="dwr/util.js"></script>
		
		<script type="text/javascript">
		function getAllBigType(){
			ActivityTypeService.findAllBigType(addOption);
		}
		
		function addOption(data){
			DWRUtil.removeAllOptions("select");
			
			DWRUtil.addOptions("select", data, "bigtypeId", "bigtypeName");
		}
	
		function getSmallType(){
			ActivityTypeService.findByBigType(DWRUtil.getValue("bigType"),addSmallyType);
		}
	
		function addSmallyType(data) {
			
			DWRUtil.removeAllOptions("smallType");
			DWRUtil.addOptions("smallType", data, "smalltypeId", "smalltypeName");
		}
		</script>
		<style type="text/css">
			
		</style>

	</head>
	<body class="body">
		<div class="pageContent">
				
			<jsp:include flush="true" page="../activity/header.jsp"></jsp:include>
			
			<!-- 页面主内容 -->
			<div class="main">
			
				<!-- 页面左侧内容 -->
				<div class="mainLeft">
					
					<!-- 左侧栏目1 -->
					<div class="columnType1">
						<div class="columnType1Title">
							<div class="columnType1TitlePic">
								<img src="theme/skin1/public/columnPic/01.gif"/>
							</div>
							<div class="columnType1TitleText">
								我的活动
							</div>
							<div class="columnType1TitleMore">
								<!-- 这里是更多链接，不需要请删除该链接 -->
								<!-- 
									<a href=""><img src="theme/skin1/public/more1.gif" border="0"/></a>
								 -->
							</div>
						</div>
						<div class="columnType1Content" style="background:#000;_height:1%;">
							<div id="at">
							<ul>
				        	  <li><a href="myActivity.do?method=IPost">我发起的活动</a></li>
				        	  <li><a href="myActivity.do?method=IJoin">我加入的活动</a></li>
				   	    	  <li><a href="activity.do?method=post">发起新活动</a></li>
				   	    	</ul>
   	    					</div>
						</div>
					</div>
					
					
					<!-- 左侧栏目1 -->
					<div class="columnType1" style="margin-top:5px;">
						<div class="columnType1Title">
							<div class="columnType1TitlePic">
								<img src="theme/skin1/public/columnPic/01.gif"/>
							</div>
							<div class="columnType1TitleText">
								活动分类
							</div>
							<div class="columnType1TitleMore">
								<!-- 这里是更多链接，不需要请删除该链接 -->
								<!-- 
									<a href=""><img src="theme/skin1/public/more1.gif" border="0"/></a>
								 -->
							</div>
						</div>
						<div class="columnType1Content" style="background:#000;">
							<div id="at">
							<ul>
				        	  <c:forEach items="${requestScope.typeList}" var="data">
				        	  <li><a href="getActivityByType.do?method=big&big=${data.bigtypeId}"><c:out value="${data.bigtypeName}"></c:out></a>
				       	      	<ul>
				       	      	<c:forEach items="${data.activitySmalltypes}" var="small">
				       	      	<li><a href="getActivityByType.do?method=small&small=${small.smalltypeId}"><c:out value="${small.smalltypeName}"></c:out></a></li>
				       	      	</c:forEach>
				                </ul>
				              </li>
				              </c:forEach>
				   	    	</ul>
   	    					</div>
						</div>
					</div>
					
					
				</div>
				<!-- 页面中间内容 -->
				<div class="mainContent">
					<c:forEach items="${requestScope.list}" var="data">
					<!--  中间栏目1 -->
					<div class="columnType2">
						<div class="columnType2Title">
							<div class="columnType2TitlePic">
								<img src="theme/skin1/public/columnPic/04.gif"/>
							</div>
							<div class="columnType2TitleText">
								<a href="getActivity.do?activityId=${data.activityId}"><c:out value="${data.title}"/></a>
							</div>
							<div class="columnType1TitleMore" style="width:300px;">
								<!-- 这里是更多链接，不需要请删除该链接 -->
									发表时间:<font color="#ffffff"><fmt:formatDate value="${data.postTime}" pattern="yyyy-MM-dd HH:mm"/></font>
							</div>
						</div>
						<div class="columnType2Content" style="background:#000;">
						
					            <div id="at2" style="_height:1%;"><strong>活动时间：</strong>从&nbsp;<span><fmt:formatDate value="${data.startTime}" pattern="yyyy-MM-dd"/></span>&nbsp;到&nbsp;<span><fmt:formatDate value="${data.endTime}" pattern="yyyy-MM-dd"/></span><br />
									
					              <strong>到期时间:</strong><span><fmt:formatDate value="${data.deadTime}" pattern="yyyy-MM-dd"/></span>
					                <br />
					              <strong>活动类型:</strong><span>${data.bigTypeName}===${data.smallTypeName}</span><br />
					              <strong>活动地址：</strong><span><c:out value="${data.address}"></c:out></span>
					            <div>
									<a href="activity.do?method=update&activityId=${data.activityId}">修改</a>
					              	<a href="activity.do?method=delete&activityId=${data.activityId}">删除</a>
					            </div>
					            </div>
								
								
						</div>
					</div>
					</c:forEach>
					<div style="margin-left:20px;">
					<c:out value="${requestScope.url}" escapeXml="false"></c:out>
					</div>
				</div>
				
				<!-- 页面右侧内容 -->
				<div class="mainRight">
				
					<!-- 右侧栏目1 -->
					<div class="columnType1">
						<div class="columnType1Title">
							<div class="columnType1TitlePic">
								<img src="theme/skin1/public/columnPic/06.gif"/>
							</div>
							<div class="columnType1TitleText">
								<a href="">右侧窗体1</a>
							</div>
							<div class="columnType1TitleMore">
								<!-- 这里是更多链接，不需要请删除该链接 -->
								<!-- 
									<a href=""><img src="theme/skin1/public/more1.gif" border="0"/></a>
								 -->
							</div>
						</div>
						<div class="columnType1Content">
							<div id="rv"><a href="#">2323</a><br />
					            <div><a href="#"><img src="images/img04.gif" alt="img" /></a>活动积分<br />
					            最新活动</div>
					            </div>
					          </div>
						</div>
						<div class="columnType1End">
						</div>
					</div>
					
					
				</div>
			</div>
			
			<jsp:include flush="true" page="../activity/footer.jsp"></jsp:include>
				
		</div>
	</body>
</html>